//
//  InfoViewController.m
//  Tiger
//
//  Created by King on 11-9-18.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "InfoViewController.h"


@implementation InfoViewController
@synthesize backButton;
@synthesize m_trademark;
@synthesize m_info;


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"screen_bg"]]];
    self.m_trademark = [[UIImageView alloc] initWithFrame:CGRectMake(65,65, 189, 82)];
    [self.m_trademark setImage:[UIImage imageNamed:@"logo"]];
    [self.view addSubview:self.m_trademark];
	
    NSString* tishi = @"内容提供\n"
                        "\n"
                        "上虎（上海）精密工具有限公司\n"
                        "地址：上海市闵行区华漕镇联友路669号\n"
                        "电话：＋86－21－52264911\n"
                        "传真：＋86－21－52264919\n"
                        "\n"
                        "\n"
                        "条款及条件\n"
                        "TOPTIGER上虎的应用程序和内容\n"
                        "（文体，照片，数据，图形和软件）\n"
                        "均受版权保护";
    
    m_info = [[UITextView alloc] initWithFrame:CGRectMake(30, 150, 280, 300)];
    [m_info setBackgroundColor:[UIColor clearColor]];
    m_info.font = [UIFont systemFontOfSize:14.0f];
    m_info.editable = NO;
    m_info.textColor = [UIColor whiteColor];
    m_info.text  = tishi;
    [self.view addSubview:m_info];
	//self.view.bounds = CGRectMake(0, 0, 320,434);
	//self.view = [[UIView alloc ] initWithFrame:CGRectMake(0,0,320,434)]; 
	
	UIImage *buttonImageNormal1 = [UIImage imageNamed:@"bt_back.png"];
	[backButton setBackgroundImage:buttonImageNormal1 forState:UIControlStateNormal];
	
	
	UIImage *buttonImagePressed = [UIImage imageNamed:@"bn_back.png"];
	UIImage *stretchableButtonImagePressed = [buttonImagePressed stretchableImageWithLeftCapWidth:12 topCapHeight:0];
	[backButton setBackgroundImage:stretchableButtonImagePressed forState:UIControlStateHighlighted];
}



- (IBAction)backButtonTapped:(id)sender{
	
	 [self dismissModalViewControllerAnimated:YES];
	
}

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations.
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc. that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [m_trademark release];
    [m_info release];
    [super dealloc];
}


@end
